package com.example.piece.ui.demo

import android.view.View
import androidx.databinding.ViewDataBinding
import com.therouter.router.Route
import com.example.piece.R
import com.example.piece.constant.RoutePath
import com.example.piece.databinding.TestActivityLogBinding
import com.example.piece.ui.activity.Layer3Activity
import com.wenming.library.LogReport
import com.wenming.library.save.imp.LogWriter

/**
 * 日志测试
 */
@Route(path = RoutePath.TESTActivity.LOG_TEST_ACTIVITY)
class LogTestActivity :
    Layer3Activity<TestActivityLogBinding, ViewDataBinding>() {

    override val isTransparentStatusBar: Boolean = false

    override val isDarkMode: Boolean = false
    override val centerLayoutRes: Int
        get() = R.layout.test_activity_log
    override val title: String
        get() = "日志测试"
    override val leftIcon1Res: Int
        get() = R.drawable.ic_back

    override fun onClickLeftIcon1(view: View) {
        super.onClickLeftIcon1(view)
        onBackPressed()
    }

    /**
     * 写入日志
     */

    fun onWriteLog(view: View) {
        LogWriter.writeLog("测试", "这是个日志")

    }

    /**
     * 上传日志
     */

    fun onUpDataLog(view: View) {
        LogReport.getInstance().upload(this)
    }


}